<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<html>
<head>
	<title></title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/frame/tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" />
		<link type="text/css" rel="stylesheet" href="${ctx}/css/cupertino/jquery-ui-1.8.13.custom.css" />
	<link type="text/css" rel="stylesheet" href="${ctx}/frame/images/style.css" />
	<script type="text/javascript" src="${ctx}/frame/tablecloth/tablecloth.js"></script>
	<script src="${ctx}/js/table.js" type="text/javascript"></script>
	<script src="${ctx}/js/jquery.js" type="text/javascript"></script>
	<script src="${ctx}/css/cupertino/jquery-ui-1.8.13.custom.min.js" type="text/javascript"></script>
	<script src="${ctx}/css/cupertino/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
	<script src="${ctx}/js/tree/MzTreeView11.js" type="text/javascript"></script>
	<script src="${ctx}/js/DlgCtrl.js" type="text/javascript"></script>
	<script src="${ctx}/js/function.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
	background-color:white;
    margin:5px;
    overflow:auto;
}
-->
</style>
<script type="text/javascript">

$(document).ready(function(){
	setPageJump();
	var typeCtrl = new DlgCtrl();
	typeCtrl.bindCtrl("COMM_STATUS","tpname","classid","radio","ID");
	DateFor("tm1",monthAdd(-6));
	DateFor("tm2");
	});


//初始化分页跳转
function setPageJump(){
	var totalPages = '${page.totalPages}';
	var pageNo = '${page.pageNo}';

	if(totalPages==""){totalPages = 1;}
	else{
		totalPages = parseInt(totalPages);
		}
	if(pageNo==""){pageNo=1;}
	else{
		pageNo = parseInt(pageNo);
		}
	var jump = $("#jump").bind("change",function(){
			jumpPage($(this).val());
		});
	for(var i=1; i<=totalPages; i++){
		if(i==pageNo){
			$("<option value=\""+i+"\" SELECTED >"+i+"/"+totalPages+"</option>").appendTo("#jump");
			}
		else{
			$("<option value=\""+i+"\" >"+i+"/"+totalPages+"</option>").appendTo("#jump");
			}		
		}
}
</script>
</head>

<body>
	
	<div id="ptop">
	<div id="tleft"></div>
	<div id="ticon"><img src="../frame/images/icon_list.gif"/>&nbsp;</div>
	<div id="ttitle"><a href="${ctx }/sms/smslog.action"><span style="font-weight:bold">已发短信</span></a>┊<a href="${ctx }/mail/maillog.action">已发邮件</a></div>
	<div id="tright"></div>
	</div>
	
	<div id="pmain">
	<div class="errdiv"><span class="error"><s:actionmessage /> </span></div>
	<form id="mainForm" action="smslog.action" method="post">
	<div>
			
			<table class="tbfm" style="text-align:left;">
				<tr>
					<td>手机号： <input type="text" name="target"
						 value="${param['target']}" size="20"/></td>
	
					<td>发送时间： 
					<input type="text" name="start" id="tm1"
						 value="${param['start']}" size="10"/>至<input type="text" name="end" id="tm2"
						 value="${param['end']}" size="10"/> </td>
			
					<td>发送状态： 
					<input type="hidden" name="classid" id="classid"
						 value="${param['classid']}" size="10"/>
					<input type="text" name="" id="tpname"
						 value="" size="10"/></td>
							
					<td align="center"><input type="button" value=" 搜 索 " onclick="search();"/></td>
				</tr>
			</table>

		</div>
		<div id="tpanel">
		
				<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
				<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
				<input type="hidden" name="page.order" id="order" value="${page.order}"/>
				<input type="hidden" name="filter_EQL_parentId" value="${param['filter_EQL_parentId']}" size="30" />
			<table cellspacing="0" cellpadding="0" id="infolist">
			<tr>
				<th>手机号</th>
				<th>信息内容</th>
				<th>发送时间</th>
				<th>发送状态</th>
				<th style="width:100px;">操作</th>
			</tr>
		
			<s:iterator value="page.result">
					<tr>
						<td><span>${target}</span></td>
						<td><span>${msg}</span></td>
						<td><span><s:date name="smsTime" format="yyyy-MM-dd HH:mm:ss"/></span></td>
						<td><span>${sysClass.name}</span></td>		
						<td><span>
						<a href="smslog!input.action?id=${id }">查看</a>&nbsp;
						<a href="smslog!delete.action?id=${id }">删除</a></span>
						</td>
					</tr>
			</s:iterator>	
			<tr>
				<td colspan="7">
				<span id="tabfun" >
				<input type="checkbox" onclick="selectAll();"/>全选
				</span> 
					<span id="tabpage" >
					<a href="javascript:jumpPage(1)"><img src="../frame/images/first.gif"/></a>&nbsp;&nbsp;&nbsp;
					<s:if test="page.hasPre"><a href="javascript:jumpPage(${page.prePage})"><img src="../frame/images/pre.gif"/></a>&nbsp;&nbsp;&nbsp;</s:if>
					<s:if test="page.hasNext"><a href="javascript:jumpPage(${page.nextPage})"><img src="../frame/images/next.gif"/></a>&nbsp;&nbsp;&nbsp;</s:if>
					<a href="javascript:jumpPage(${page.totalPages})"><img src="../frame/images/end.gif"/></a> 
					跳转
						<select id="jump">
						</select>
						</span>
						</td>
			</tr>																			
		</table>
		
		</div>
			</form>
	</div>

</body>
</html>
